<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* resize 改变大小 需要配合overflow使用 */
      .box {
        width: 200px;
        height: 200px;
        background-color: orange;
        /* resize: horizontal; */
        /* resize: vertical; */
        resize: both;

        overflow: auto;
      }
      .box2 {
        width: 400px;
        /* height: 100px; */
        height: 400px;
        background-color: red;
      }
    </style>
  </head>
  <body>
    <div class="box">
      resize改变大小
      <div class="box2"></div>
    </div>
  </body>
</html>
